import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

const routes: Routes = [
  {
    path: '', redirectTo: "home", pathMatch: "full",
  },
  {
    path: 'home', loadChildren: () => import('./home/home.module').then(m => m.HomeModule),
    data: {
      breadcrumb: '首页'
    },
  },
  {
    path: 'routerAbout', loadChildren: () => import('./router-about/router-about.module').then(m => m.RouterAboutModule),
    data: {
      breadcrumb: '路由设置'
    },
  },
  {
    path: 'templategrammar', loadChildren: () => import('./template-grammar/template-grammar.module').then(m => m.TemplateGrammarModule),
    data: {
      breadcrumb: '模版语法'
    },
  },
  {
    path: 'httpModel', loadChildren: () => import('./http-demo/http-demo.module').then(m => m.HttpDemoModule),
    data: {
      breadcrumb: 'Http请求Demo'
    },
  }
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
